admin: Ensure we pass options to subcommands
authorColin Walters <walters@verbum.org>
Sun, 9 Sep 2012 15:31:22 +0000 (11:31 -0400)
committerColin Walters <walters@verbum.org>
Sun, 9 Sep 2012 15:31:22 +0000 (11:31 -0400)
Otherwise ostree admin --ostree-dir=/foo deploy --no-kernel bar
doesn't work.

src/ostree/ot-builtin-admin.c

index f8aa8f9fea326801876af607793b0639b93b84d9..54f2829b81582b2debf76a0be5c0497fe12e6f82 100644 (file)
@@ -64,6 +64,8 @@ ostree_builtin_admin (int argc, char **argv, GFile *repo_path, GError **error)
 
   context = g_option_context_new ("[OPTIONS] SUBCOMMAND - Run an administrative subcommand");
   g_option_context_add_main_entries (context, options, NULL);
+  /* Skip subcommand options */
+  g_option_context_set_ignore_unknown_options (context, TRUE);
 
   if (!g_option_context_parse (context, &argc, &argv, error))
     goto out;